tar=[1,2,3,4]
count=0
for i in range(len(tar)):
    t1=tar.copy()
    x=str(t1.pop(i))
    for j in range(len(t1)):
        t2=t1.copy()
        y=str(t2.pop(j))
        for k in range(len(t2)):
            print(x+y+str(t2[k]),end='')
            count+=1
    print('')
print('最终结果为：%s个' % count)
